## [1] "/home/guanshim/Documents/gitlab/Omics_Integration/DataRaw/hiv_infected_un"
Preprocessing
# source functions source to get the
# load_filtered_micro_level function to get clr of RA
source(paste0(dir, "Code/5_29_Generate_filtered_Data_Microbiome.R"))
# clean and transform transcriptome data, subset of genes
source(paste0(dir, "Code/6_5_clean_transcriptome.R"))
# clinical data
source(paste0(dir, "Code/6_5_clean_clinical.R"))
# diagnostic plots and tables
source(paste0(dir, "Code/ref_plots.R"))
# outliers
source(paste0(dir, "Code/outliers.R"))
## [1] "Regularized Log Transformation will be applied!"
## [1] "Check Samples, Match: "
## [1] TRUE
## [1] "No gene list provided, will use the whole Transcriptome"
# wrappers
source(paste0(dir, "Code/wrappers.R"))
# run smccnet
source(paste0(dir, "Code/put_together.R"))
# subset global rna-seq by mean, var
source(paste0(dir, "Code/generate_genelist.R"))
########## Datasets ############# phenotype contains ID ####
clin <- rescaled_cli()
## [1] "Regularized Log Transformation will be applied!"
## [1] "Check Samples, Match: "
## [1] TRUE
## [1] "No gene list provided, will use the whole Transcriptome"
CD14 <- clin %>% select(CD14)
anyNA(CD14)
## [1] FALSE
LPS <- clin %>% select(LPS)
n_na <- which(is.na(LPS))
######### Transcriptome ############### Transcriptome ######
rna_isgs <- as.data.frame(read.delim(paste0(dir, "DataRaw/hiv_infected_un/coreISG"))) %>%
rescaled_rna(., rlog = T)
## [1] "Regularized Log Transformation will be applied!"
## [1] "Check Samples, Match: "
## [1] TRUE
## [1] "Use a subset of genes"
# the isgs data
isgs_rlog <- rna_isgs[[1]]
# names
colnames(isgs_rlog) <- rna_isgs[[2]]$Symbol
######## genes beta
rna_genesbeta <- as.data.frame(read.delim(paste0(dir, "DataRaw/hiv_infected_un/genesbeta"))) %>%
rescaled_rna(., rlog = T)
## [1] "Regularized Log Transformation will be applied!"
## [1] "Check Samples, Match: "
## [1] TRUE
## [1] "Use a subset of genes"
genesbeta_rlog <- rna_genesbeta[[1]]
colnames(genesbeta_rlog) <- rna_genesbeta[[2]]$Symbol
#### global filtered #######3
mean_cut <- 100
var_cut <- 50
filtered_rna <- filter_rescale_rna(mean_cut, var_cut, T)
## [1] "Check Samples, Match: "
## [1] TRUE
## [1] "Regularized Log Transformation will be applied!"
## [1] "Check Samples, Match: "
## [1] TRUE
## [1] "Use a subset of genes"
filtered_rlog <- filtered_rna[[1]]
colnames(filtered_rlog) <- filtered_rna[[2]]$Symbol
print(ncol(filtered_rlog))
## [1] 1905
#### Microbiome ##########
micro_data <- load_filtered_micro_level_samples("genus", prevalence = 40,
RA = 2, wd = "Ubuntu")
## Found "Unclassified" category in input data
## Created new "Other" category.
## Converted 35400 counts to "Other" otu category.
## Remaining OTUS: 270 (Including "Other").
##
## Prevalence cutoff: 40% (i.e., at least 40% of libaries must be represented to keep OTU)
## Found 'Other' category in input data.
## Collapsed 195 OTUs to 'Other' in OTU table.
## Converted 80457 counts to 'Other' in OTU table.
## Remaining OTUs: 75 (Including 'Other').
##
## Relative abundance cutoff: 2 % (i.e., at least one library must have RA > 2 % to keep OTU).
## Found "Other" category in input data.
## Collapsed 21 OTUs to "Other" otu category.
## Converted 47123 counts to "Other" otu category.
## Remaining OTUS: 54 (Including "Other").
##
## Contains 27 subjects/libraries from Explicet OTU file.
micro_clr <- micro_data[[2]] %>% as.data.frame()
# rescale to mean 0 and variance 1
mibi <- rescale_microbiome(micro_clr)
print("Before outlier test, core-ISGs 246, beta-ISG 406, Transcriptome 1905, Genus Microbiome 54")
## [1] "Before outlier test, core-ISGs 246, beta-ISG 406, Transcriptome 1905, Genus Microbiome 54"
########## outlier test ######### by = 2, type 10 get the boolean mask
########## vector
isgs_outlier <- grubbs_df(isgs_rlog, 2, 10)$fdr > 0.05
genesbeta_outlier <- grubbs_df(genesbeta_rlog, 2, 10)$fdr > 0.05
filtered_outlier <- grubbs_df(filtered_rlog, 2, 10)$fdr > 0.05
mibi_outlier <- grubbs_df(mibi, 2, 10)$fdr > 0.05
# subset by outlier test
dim(isgs_rlog[, isgs_outlier])
## [1] 27 203
dim(genesbeta_rlog[, genesbeta_outlier])
## [1] 27 405
dim(filtered_rlog[, filtered_outlier])
## [1] 27 1894
ncol(mibi[, mibi_outlier])
## [1] 44
print("After outlier test, core-ISGs 203, beta-ISG 405, Transcriptome 1894, Genus Microbiome 44")
## [1] "After outlier test, core-ISGs 203, beta-ISG 405, Transcriptome 1894, Genus Microbiome 44"
Cross Validation to define penalties
Run SmCCNet
With CD14
########## with CD14 #############3
setwd("~/Documents/gitlab/Omics_Integration/DataProcessed/")
CVDir <- "CD14_Outlier3_Global_100_50_Genus_3_4foldCV/"
dir <- "~/Documents/gitlab/Omics_Integration/DataProcessed/CD14_Outlier3_Global_100_50_Genus_3_4foldCV/"
# edge Cut 0
run_SmCCNet(X1 = filtered_rlog[, filtered_outlier],
X2 = mibi[, mibi_outlier],
Y = CD14,
l1 = 0.2,
l2 = 0.75,
s1 = 0.7,
s2 = 0.9,
weights = NULL,
# n_na = n_na,
# NoTrait itself is to control whether to use Y or not
NoTrait = FALSE,
EdgeCut = 0)
## [1] "weights can be NULL or a length 3 vector"


## NULL

## NULL

## NULL

## NULL

## NULL
## [[1]]
## [1] 2 51 58 112 125 146 147 206 222 332 339 345 351 363
## [15] 374 381 564 629 655 682 684 709 715 947 963 968 976 1051
## [29] 1096 1124 1127 1137 1181 1192 1204 1221 1332 1360 1361 1379 1402 1403
## [43] 1406 1442 1447 1560 1566 1587 1612 1621 1637 1642 1669 1678 1766 1794
## [57] 1843 1936
##
## [[2]]
## [1] 18 27 85 102 111 122 187 198 218 221 297 302 372 492
## [15] 540 570 578 591 787 802 821 827 842 888 920 969 981 1035
## [29] 1036 1055 1131 1151 1159 1165 1219 1256 1263 1351 1368 1444 1455 1472
## [43] 1490 1615 1638 1661 1672 1719 1739 1744 1745 1776 1793 1826 1917
##
## [[3]]
## [1] 21 46 52 148 160 168 317 380 470 473 484 520 573 604
## [15] 650 738 748 774 783 832 853 855 857 905 1013 1046 1061 1179
## [29] 1232 1315 1325 1430 1437 1439 1538 1564 1625 1630 1647 1676 1690 1695
## [43] 1710 1792 1849 1884 1895 1909 1911 1913 1918 1920 1924 1926 1927 1930
##
## [[4]]
## [1] 26 41 50 60 65 88 153 242 278 352 359 419 425 432
## [15] 463 464 515 538 565 627 713 841 854 873 874 916 922 962
## [29] 992 1008 1021 1118 1148 1158 1187 1201 1214 1241 1287 1301 1304 1331
## [43] 1344 1346 1365 1381 1383 1429 1488 1516 1557 1575 1592 1623 1633 1681
## [57] 1688 1692 1728 1797 1801 1816 1825 1837 1921
##
## [[5]]
## [1] 40 47 55 71 81 124 132 141 188 203 254 269 275 277
## [15] 347 356 360 382 441 442 443 504 558 566 585 587 597 605
## [29] 614 632 653 661 680 694 702 712 727 733 743 751 778 800
## [43] 835 836 844 860 864 871 882 884 889 902 917 945 999 1007
## [57] 1014 1077 1107 1169 1205 1244 1260 1295 1316 1324 1336 1367 1380 1421
## [71] 1428 1456 1489 1495 1498 1499 1509 1527 1561 1576 1593 1604 1610 1622
## [85] 1717 1718 1733 1741 1762 1769 1781 1790 1811 1832 1848 1850 1873 1874
## [99] 1876 1887 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907
## [113] 1908 1910 1912 1914 1915 1916 1919 1922 1923 1925 1928 1929 1931 1932
## [127] 1933 1934 1935 1937 1938
######3 edge Cut 0.1
load(paste0(dir, "SmCCNetWeights.RData"))
edgecut_by(filtered_rlog[, filtered_outlier], mibi[, mibi_outlier], 0.1)
## [1] "Load proper similarity matrix (abar) and modules!"
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."

## NULL
Without CD14
########## with CD14 #############3
setwd("~/Documents/gitlab/Omics_Integration/DataProcessed/")
CVDir <- "_Outlier1_Global_100_50_Genus_1_4foldCV/"
dir <- "~/Documents/gitlab/Omics_Integration/DataProcessed/_Outlier1_Global_100_50_Genus_1_4foldCV/"
########## without CD14 ###########
run_SmCCNet(X1 = filtered_rlog[, filtered_outlier],
X2 = mibi[, mibi_outlier],
Y = NULL,
l1 = 0.5,
l2 = 0.1,
s1 = 0.7,
s2 = 0.9,
weights = NULL,
# n_na = n_na,
# NoTrait itself is to control whether to use Y or not
NoTrait = TRUE,
EdgeCut = 0)
## [1] "weights can be NULL or a length 3 vector"


## NULL

## NULL

## NULL

## NULL

## NULL
## [[1]]
## [1] 1 4 6 7 13 24 25 32 35 36 44 46 53 56
## [15] 62 63 66 67 75 77 79 81 82 83 89 93 104 113
## [29] 114 115 126 128 129 130 131 135 136 137 138 140 142 143
## [43] 146 153 157 161 172 174 178 180 185 189 193 199 203 204
## [57] 205 209 212 222 223 226 229 236 238 240 245 246 247 251
## [71] 253 259 260 268 270 274 282 286 290 294 299 322 325 327
## [85] 332 335 336 341 343 351 355 356 365 368 369 370 373 376
## [99] 377 379 383 385 389 391 394 399 400 402 403 405 411 423
## [113] 435 437 442 444 447 448 454 462 472 487 488 496 505 507
## [127] 508 509 512 514 517 522 523 536 543 549 552 554 557 561
## [141] 562 566 567 586 588 589 600 601 605 606 611 612 613 617
## [155] 618 627 631 632 642 643 644 648 654 662 665 668 670 671
## [169] 672 673 675 676 680 693 698 702 706 708 713 718 719 721
## [183] 732 734 738 739 744 750 751 752 763 765 767 770 772 776
## [197] 777 778 783 787 789 791 796 798 805 809 811 815 820 825
## [211] 826 828 829 835 836 843 844 848 852 856 858 861 862 867
## [225] 868 875 877 878 885 899 901 902 903 910 911 912 921 923
## [239] 925 927 929 932 940 953 955 956 961 966 967 974 977 979
## [253] 983 988 989 995 996 997 1001 1009 1010 1011 1012 1015 1018 1025
## [267] 1031 1033 1035 1040 1041 1044 1045 1049 1052 1054 1058 1065 1079 1081
## [281] 1082 1084 1094 1098 1102 1103 1111 1115 1119 1140 1141 1142 1144 1145
## [295] 1147 1152 1157 1160 1161 1163 1170 1172 1174 1182 1184 1188 1207 1208
## [309] 1211 1212 1223 1225 1226 1239 1241 1245 1251 1257 1259 1261 1266 1269
## [323] 1270 1273 1278 1279 1283 1286 1292 1293 1299 1303 1311 1313 1314 1317
## [337] 1320 1328 1330 1336 1338 1340 1343 1347 1348 1353 1354 1367 1371 1375
## [351] 1382 1383 1385 1398 1404 1407 1414 1417 1432 1441 1443 1447 1451 1456
## [365] 1457 1464 1467 1471 1473 1476 1480 1485 1487 1491 1494 1498 1499 1503
## [379] 1510 1511 1513 1516 1521 1530 1532 1540 1544 1548 1556 1562 1563 1569
## [393] 1571 1572 1574 1575 1576 1583 1594 1595 1596 1603 1609 1611 1614 1619
## [407] 1620 1624 1629 1631 1650 1653 1662 1665 1668 1677 1683 1685 1696 1697
## [421] 1703 1705 1708 1711 1717 1718 1721 1724 1730 1741 1746 1747 1750 1757
## [435] 1758 1764 1768 1770 1776 1778 1779 1786 1796 1807 1820 1826 1827 1828
## [449] 1830 1833 1835 1838 1850 1855 1865 1867 1873 1876 1885 1886 1888 1889
## [463] 1891 1896
##
## [[2]]
## [1] 2 3 11 17 21 28 30 34 37 47 48 51 55 58
## [15] 68 69 71 78 80 94 96 97 100 101 105 106 109 112
## [29] 118 119 124 125 132 139 147 148 154 156 160 164 166 168
## [43] 169 170 173 175 186 188 201 206 207 214 216 231 232 233
## [57] 237 248 261 264 269 272 275 283 284 287 289 291 296 302
## [71] 306 309 310 315 317 320 329 331 339 340 342 345 347 358
## [85] 360 364 374 381 382 388 404 412 414 417 419 425 429 430
## [99] 433 436 441 453 457 466 469 473 480 482 484 486 493 500
## [113] 501 504 513 520 525 526 534 548 550 558 563 564 565 569
## [127] 570 577 582 585 587 591 592 596 599 604 607 614 616 621
## [141] 625 629 633 634 646 647 650 653 655 657 658 660 664 666
## [155] 667 679 682 685 689 691 694 695 709 710 712 720 726 727
## [169] 728 733 743 748 755 756 768 769 773 786 793 800 817 831
## [183] 832 841 847 853 855 860 869 871 873 880 882 884 889 898
## [197] 908 916 918 926 941 944 945 948 949 959 963 968 971 972
## [211] 976 980 982 990 994 999 1000 1003 1005 1006 1007 1008 1014 1017
## [225] 1021 1022 1024 1027 1030 1046 1047 1048 1051 1064 1069 1070 1072 1078
## [239] 1080 1083 1092 1093 1096 1097 1104 1121 1124 1125 1126 1137 1138 1143
## [253] 1146 1148 1151 1153 1155 1169 1171 1173 1177 1179 1181 1189 1192 1193
## [267] 1194 1198 1200 1203 1204 1205 1216 1217 1221 1229 1237 1242 1244 1260
## [281] 1267 1272 1276 1280 1282 1284 1290 1306 1310 1316 1318 1325 1345 1356
## [295] 1357 1360 1361 1362 1365 1366 1369 1379 1380 1381 1389 1397 1406 1413
## [309] 1415 1421 1423 1429 1435 1442 1450 1453 1461 1463 1465 1475 1477 1479
## [323] 1481 1482 1489 1495 1496 1505 1507 1509 1514 1522 1527 1528 1538 1539
## [337] 1543 1560 1561 1564 1577 1581 1582 1586 1587 1589 1592 1593 1598 1600
## [351] 1608 1610 1612 1621 1622 1623 1630 1633 1635 1636 1637 1639 1644 1646
## [365] 1647 1652 1659 1669 1674 1675 1676 1678 1680 1689 1690 1692 1704 1709
## [379] 1710 1712 1723 1732 1733 1735 1736 1748 1755 1760 1762 1763 1769 1771
## [393] 1772 1781 1782 1783 1788 1790 1791 1798 1800 1801 1804 1806 1811 1812
## [407] 1816 1817 1829 1839 1842 1843 1848 1849 1857 1859 1860 1863 1870 1874
## [421] 1878 1880 1884 1887 1899
##
## [[3]]
## [1] 5 10 14 15 16 18 23 26 33 38 41 45 50 52
## [15] 54 65 70 72 74 88 92 95 99 103 117 127 134 145
## [29] 149 159 167 171 182 187 192 195 210 217 220 221 224 225
## [43] 234 235 242 244 249 250 280 293 298 301 303 304 305 316
## [57] 319 324 326 338 344 349 353 359 361 367 372 380 384 390
## [71] 393 395 409 410 424 440 450 456 459 460 463 464 465 476
## [85] 479 481 492 495 498 503 511 515 519 532 535 540 544 551
## [99] 556 560 571 575 580 581 583 590 598 602 608 619 624 635
## [113] 637 641 649 651 652 669 686 687 697 699 711 717 722 723
## [127] 725 730 731 737 742 749 761 766 771 775 779 781 782 788
## [141] 794 795 801 802 813 814 819 821 822 830 840 849 850 851
## [155] 863 865 872 874 883 892 894 900 904 906 909 913 914 915
## [169] 920 922 933 934 942 943 957 962 965 969 981 987 992 993
## [183] 1013 1016 1020 1023 1055 1056 1059 1061 1074 1087 1108 1110 1122 1131
## [197] 1139 1158 1164 1167 1168 1187 1199 1201 1202 1219 1224 1228 1232 1233
## [211] 1234 1243 1255 1258 1271 1289 1294 1297 1301 1304 1308 1309 1312 1315
## [225] 1331 1335 1344 1349 1355 1363 1368 1374 1386 1390 1391 1392 1396 1403
## [239] 1412 1422 1431 1436 1439 1454 1470 1472 1478 1484 1488 1490 1492 1493
## [253] 1501 1523 1533 1536 1545 1549 1555 1557 1558 1570 1578 1584 1590 1591
## [267] 1597 1599 1602 1605 1613 1615 1618 1632 1634 1638 1645 1649 1657 1661
## [281] 1670 1672 1681 1684 1686 1688 1691 1693 1699 1701 1706 1707 1715 1719
## [295] 1720 1725 1728 1731 1739 1745 1749 1759 1765 1767 1774 1775 1792 1793
## [309] 1794 1795 1797 1805 1808 1809 1814 1822 1825 1836 1852 1853 1854 1856
## [323] 1858 1869 1871 1872 1883 1893 1894 1908
##
## [[4]]
## [1] 9 29 31 40 43 49 59 61 84 107 108 110 121 123
## [15] 133 141 144 151 158 162 165 176 177 181 184 190 191 194
## [29] 208 213 215 219 228 239 254 263 277 278 281 285 295 308
## [43] 311 313 323 337 346 348 350 354 363 378 398 407 408 428
## [57] 438 439 443 446 449 452 461 467 468 474 475 478 494 502
## [71] 510 516 530 531 533 537 545 546 547 573 574 597 609 610
## [85] 620 622 626 638 639 640 659 677 681 684 688 701 703 705
## [99] 715 740 741 753 758 759 764 774 780 799 818 823 838 859
## [113] 864 879 881 886 891 907 917 928 930 931 938 946 947 954
## [127] 970 973 986 1002 1026 1028 1034 1037 1038 1042 1043 1053 1075 1076
## [141] 1086 1089 1090 1106 1107 1112 1127 1128 1129 1130 1136 1156 1162 1166
## [155] 1183 1206 1213 1231 1240 1246 1248 1254 1263 1265 1268 1275 1277 1285
## [169] 1319 1321 1324 1326 1332 1342 1359 1370 1373 1377 1400 1401 1402 1405
## [183] 1408 1410 1411 1416 1420 1424 1425 1427 1428 1430 1440 1445 1452 1502
## [197] 1506 1515 1517 1520 1525 1526 1529 1535 1541 1547 1551 1553 1559 1566
## [211] 1568 1573 1579 1580 1585 1601 1604 1607 1617 1641 1642 1648 1663 1666
## [225] 1667 1695 1713 1714 1722 1737 1753 1766 1773 1785 1787 1810 1832 1851
## [239] 1864 1877 1881 1882 1890 1923
##
## [[5]]
## [1] 12 42 116 152 200 211 265 276 307 321 357 362 396 406
## [15] 415 418 420 422 426 427 434 445 483 485 528 539 584 623
## [29] 628 656 683 714 729 754 757 784 790 792 797 807 810 816
## [43] 837 854 857 870 876 919 952 1032 1050 1067 1071 1073 1099 1101
## [57] 1113 1116 1150 1159 1175 1185 1190 1196 1197 1214 1220 1227 1230 1235
## [71] 1250 1252 1262 1264 1281 1388 1399 1418 1419 1433 1434 1437 1474 1486
## [85] 1497 1537 1554 1565 1640 1658 1679 1702 1740 1742 1777 1780 1815 1821
## [99] 1831 1837 1844 1845 1879 1901
######3 edge Cut 0.1
load(paste0(dir, "SmCCNetWeights.RData"))
edgecut_by(filtered_rlog[, filtered_outlier], mibi[, mibi_outlier], 0.1)
## [1] "Load proper similarity matrix (abar) and modules!"

## NULL

## NULL

## NULL
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
Clustering of Clinical Phenotypes
# clin[, c(6:18, 25)] standardized to mean 0 var 1
df <- clin[, c(6:18, 25)]
clinical_names <- c("Blood CD4 T Cell Counts (cells/ul)", "Plasma Viral Load",
"Tissue HIV RNA (per CD4 T cell)", "Tissue CD4 T Cell Counts (number/g)",
"IL-6 (pg/ml)", "CRP (ug/ml)", "iFABP (pg/ml)", "sCD27 (U/ml)",
"CD14 (ng/ml)", "LPS (pg/ml)", "LTA (OD)", base::paste("IFN",
"α", sep = ""), base::paste("IFN", "β", sep = ""),
"CD4 T cells (% viable CD45+ cells)")
colnames(df) <- clinical_names
density_values_ind(df %>% stack(), "Density plot of clinical phenotypes")
## [1] "A column called group and a column called values"

clin_pearson <- cor_heatmap(df, "pearson", TRUE, "complete",
text_size = 3)
## [1] "Use pairwise.complete.obs, and methods from pearson, kendall, spearman"

# clin_pearson <- cor_heatmap(df, 'spearman', TRUE,
# 'complete', text_size = 3)
CRP is not correlated with LPS/CD14
CRP <- clin %>% select(CRP)
# no missing
anyNA(CRP)
## [1] FALSE
########## with CRP #############3
setwd("~/Documents/gitlab/Omics_Integration/DataProcessed/")
CVDir <- "CRP_Outlier1_Global_100_50_Genus_1_4foldCV/"
run_SmCCNet(X1 = filtered_rlog[, filtered_outlier],
X2 = mibi[, mibi_outlier],
Y = CRP,
l1 = 0.1,
l2 = 0.05,
s1 = 0.7,
s2 = 0.9,
weights = NULL,
# n_na = n_na,
# NoTrait itself is to control whether to use Y or not
NoTrait = FALSE,
EdgeCut = 0)
## [1] "weights can be NULL or a length 3 vector"


## NULL

## NULL

## NULL

## NULL

## NULL

## NULL

## NULL

## NULL

## NULL

## NULL

## NULL
## [[1]]
## [1] 7 76 215 250 326 501 645 700 760 786 915 953 1063 1067
## [15] 1167 1395 1478 1512 1552 1557 1563 1757 1918
##
## [[2]]
## [1] 16 120 183 318 328 334 529 538 987 1181 1188 1322 1774 1926
##
## [[3]]
## [1] 17 100 241 355 402 427 503 530 622 785 880 1058 1221 1348
## [15] 1362 1423 1603 1616 1705 1902
##
## [[4]]
## [1] 22 176 299 349 492 540 570 802 888 1022 1263 1320 1505 1615
## [15] 1734 1793 1915
##
## [[5]]
## [1] 27 74 219 257 343 384 412 467 474 493 510 749 787 804
## [15] 810 812 893 1055 1180 1203 1455 1643 1664 1689 1753 1836 1884 1907
##
## [[6]]
## [1] 39 95 1073 1210 1333 1346 1594 1669 1938
##
## [[7]]
## [1] 44 68 77 83 105 110 150 153 286 448 517 601 686 710
## [15] 795 890 962 1002 1023 1104 1239 1278 1369 1396 1412 1487 1629 1665
## [29] 1670 1703 1728 1786 1806 1859 1895
##
## [[8]]
## [1] 52 274 340 459 669 859 1115 1238 1555 1698 1860 1924
##
## [[9]]
## [1] 73 245 305 357 425 565 598 635 958 1108 1122 1158 1691 1701
## [15] 1745 1909
##
## [[10]]
## [1] 111 302 390 481 608 688 731 866 975 1035 1131 1219 1246 1251
## [15] 1252 1308 1429 1472 1490 1492 1618 1649 1725 1744 1819 1823 1838 1910
##
## [[11]]
## [1] 225 969 1043 1072 1077 1134 1393 1409 1459 1803 1919
######3 edge Cut 0.1
dir <- "~/Documents/gitlab/Omics_Integration/DataProcessed/CRP_Outlier1_Global_100_50_Genus_1_4foldCV/"
load(paste0(dir, "SmCCNetWeights.RData"))
edgecut_by(filtered_rlog[, filtered_outlier], mibi[, mibi_outlier], 0.1)
## [1] "Load proper similarity matrix (abar) and modules!"

## NULL
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."

## NULL

## NULL
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."

## NULL
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."

## NULL
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
LPS
LPS <- clin %>% select(LPS)
n_na <- which(is.na(LPS))
setwd("~/Documents/gitlab/Omics_Integration/DataProcessed/")
CVDir <- "LPS_Outlier1_Global_100_50_Genus_1_4foldCV/"
run_SmCCNet(X1 = filtered_rlog[, filtered_outlier],
X2 = mibi[, mibi_outlier],
Y = LPS,
l1 = 0.1,
l2 = 0.1,
s1 = 0.7,
s2 = 0.9,
weights = NULL,
n_na = n_na,
# NoTrait itself is to control whether to use Y or not
NoTrait = FALSE,
EdgeCut = 0)
## [1] "weights can be NULL or a length 3 vector"


## NULL

## NULL

## NULL

## NULL

## NULL

## NULL

## NULL
## [[1]]
## [1] 5 18 33 41 159 224 248 272 280 303 304 464 476 498
## [15] 532 569 570 689 730 822 874 894 959 1022 1078 1122 1126 1301
## [29] 1479 1536 1545 1558 1592 1659 1704 1725 1816 1908
##
## [[2]]
## [1] 28 148 168 169 188 206 275 310 347 374 382 513 587 596
## [15] 650 657 658 712 733 773 783 860 871 889 963 999 1014 1124
## [29] 1148 1192 1194 1221 1237 1306 1316 1442 1495 1507 1509 1538 1577 1612
## [43] 1636 1644 1646 1678 1788 1811 1848 1899
##
## [[3]]
## [1] 51 332 344 550 617 916 957 989 1021 1064 1104 1109 1241 1555
## [15] 1563 1759 1819 1826 1905
##
## [[4]]
## [1] 73 144 245 349 373 565 602 619 624 635 667 678 717 742
## [15] 813 863 904 906 962 965 1001 1103 1108 1158 1172 1201 1207 1303
## [29] 1488 1492 1516 1575 1613 1724 1745 1825 1909
##
## [[5]]
## [1] 106 146 151 254 323 368 478 694 869 881 946 1045 1112 1246
## [15] 1425 1430 1517 1551 1710 1722 1876 1923
##
## [[6]]
## [1] 111 524 557 683 784 842 1005 1053 1100 1393 1455 1664 1841 1874
## [15] 1928
##
## [[7]]
## [1] 129 137 153 253 335 536 552 670 719 750 811 828 923 1010
## [15] 1144 1152 1161 1184 1494 1602 1629 1807 1896
######3 edge Cut 0.1
dir <- "~/Documents/gitlab/Omics_Integration/DataProcessed/LPS_Outlier1_Global_100_50_Genus_1_4foldCV/"
load(paste0(dir, "SmCCNetWeights.RData"))
edgecut_by(filtered_rlog[-n_na, filtered_outlier], mibi[-n_na, mibi_outlier], 0.1)
## [1] "Load proper similarity matrix (abar) and modules!"
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."

## NULL
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."
## [1] "No edge passes threshold."